package com.lkd.mapper;

import com.lkd.dto.SkuDto;
import com.lkd.entity.Sku;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SkuMapper {

    //分页查询
    List<Sku> findList(SkuDto skuDto);

    //保存
    @Insert("insert into tb_sku values (null,#{skuName},#{skuImage},#{price},#{classId},#{isDiscount},#{unit},#{brandName},#{createTime},#{updateTime})")
    Boolean save(Sku sku);

    //修改
    Boolean update(Sku sku);
}
